3.1.8 \(\int \tan ^8(c+d x) \, dx\) [8]

Optimal. Leaf size=58 \[ x-\frac {\tan (c+d x)}{d}+\frac {\tan ^3(c+d x)}{3 d}-\frac {\tan ^5(c+d x)}{5 d}+\frac {\tan ^7(c+d x)}{7 d} \]

[Out]

x-tan(d*x+c)/d+1/3*tan(d*x+c)^3/d-1/5*tan(d*x+c)^5/d+1/7*tan(d*x+c)^7/d

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 2, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3554, 8} \begin {gather*} \frac {\tan ^7(c+d x)}{7 d}-\frac {\tan ^5(c+d x)}{5 d}+\frac {\tan ^3(c+d x)}{3 d}-\frac {\tan (c+d x)}{d}+x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]^8,x]

[Out]

x - Tan[c + d*x]/d + Tan[c + d*x]^3/(3*d) - Tan[c + d*x]^5/(5*d) + Tan[c + d*x]^7/(7*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3554

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d*x])^(n - 1)/(d*(n - 1))), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rubi steps

\begin {align*} \int \tan ^8(c+d x) \, dx &=\frac {\tan ^7(c+d x)}{7 d}-\int \tan ^6(c+d x) \, dx\\ &=-\frac {\tan ^5(c+d x)}{5 d}+\frac {\tan ^7(c+d x)}{7 d}+\int \tan ^4(c+d x) \, dx\\ &=\frac {\tan ^3(c+d x)}{3 d}-\frac {\tan ^5(c+d x)}{5 d}+\frac {\tan ^7(c+d x)}{7 d}-\int \tan ^2(c+d x) \, dx\\ &=-\frac {\tan (c+d x)}{d}+\frac {\tan ^3(c+d x)}{3 d}-\frac {\tan ^5(c+d x)}{5 d}+\frac {\tan ^7(c+d x)}{7 d}+\int 1 \, dx\\ &=x-\frac {\tan (c+d x)}{d}+\frac {\tan ^3(c+d x)}{3 d}-\frac {\tan ^5(c+d x)}{5 d}+\frac {\tan ^7(c+d x)}{7 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 68, normalized size = 1.17 \begin {gather*} \frac {\text {ArcTan}(\tan (c+d x))}{d}-\frac {\tan (c+d x)}{d}+\frac {\tan ^3(c+d x)}{3 d}-\frac {\tan ^5(c+d x)}{5 d}+\frac {\tan ^7(c+d x)}{7 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Tan[c + d*x]^8,x]

[Out]

ArcTan[Tan[c + d*x]]/d - Tan[c + d*x]/d + Tan[c + d*x]^3/(3*d) - Tan[c + d*x]^5/(5*d) + Tan[c + d*x]^7/(7*d)

________________________________________________________________________________________

Maple [A]
time = 0.03, size = 51, normalized size = 0.88

method result size
derivativedivides \(\frac {\frac {\left (\tan ^{7}\left (d x +c \right )\right )}{7}-\frac {\left (\tan ^{5}\left (d x +c \right )\right )}{5}+\frac {\left (\tan ^{3}\left (d x +c \right )\right )}{3}-\tan \left (d x +c \right )+\arctan \left (\tan \left (d x +c \right )\right )}{d}\) \(51\)
default \(\frac {\frac {\left (\tan ^{7}\left (d x +c \right )\right )}{7}-\frac {\left (\tan ^{5}\left (d x +c \right )\right )}{5}+\frac {\left (\tan ^{3}\left (d x +c \right )\right )}{3}-\tan \left (d x +c \right )+\arctan \left (\tan \left (d x +c \right )\right )}{d}\) \(51\)
norman \(x -\frac {\tan \left (d x +c \right )}{d}+\frac {\tan ^{3}\left (d x +c \right )}{3 d}-\frac {\tan ^{5}\left (d x +c \right )}{5 d}+\frac {\tan ^{7}\left (d x +c \right )}{7 d}\) \(53\)
risch \(x -\frac {8 i \left (105 \,{\mathrm e}^{12 i \left (d x +c \right )}+315 \,{\mathrm e}^{10 i \left (d x +c \right )}+770 \,{\mathrm e}^{8 i \left (d x +c \right )}+770 \,{\mathrm e}^{6 i \left (d x +c \right )}+609 \,{\mathrm e}^{4 i \left (d x +c \right )}+203 \,{\mathrm e}^{2 i \left (d x +c \right )}+44\right )}{105 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{7}}\) \(90\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^8,x,method=_RETURNVERBOSE)

[Out]

1/d*(1/7*tan(d*x+c)^7-1/5*tan(d*x+c)^5+1/3*tan(d*x+c)^3-tan(d*x+c)+arctan(tan(d*x+c)))

________________________________________________________________________________________

Maxima [A]
time = 0.49, size = 51, normalized size = 0.88 \begin {gather*} \frac {15 \, \tan \left (d x + c\right )^{7} - 21 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3} + 105 \, d x + 105 \, c - 105 \, \tan \left (d x + c\right )}{105 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^8,x, algorithm="maxima")

[Out]

1/105*(15*tan(d*x + c)^7 - 21*tan(d*x + c)^5 + 35*tan(d*x + c)^3 + 105*d*x + 105*c - 105*tan(d*x + c))/d

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 48, normalized size = 0.83 \begin {gather*} \frac {15 \, \tan \left (d x + c\right )^{7} - 21 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3} + 105 \, d x - 105 \, \tan \left (d x + c\right )}{105 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^8,x, algorithm="fricas")

[Out]

1/105*(15*tan(d*x + c)^7 - 21*tan(d*x + c)^5 + 35*tan(d*x + c)^3 + 105*d*x - 105*tan(d*x + c))/d

________________________________________________________________________________________

Sympy [A]
time = 0.21, size = 51, normalized size = 0.88 \begin {gather*} \begin {cases} x + \frac {\tan ^{7}{\left (c + d x \right )}}{7 d} - \frac {\tan ^{5}{\left (c + d x \right )}}{5 d} + \frac {\tan ^{3}{\left (c + d x \right )}}{3 d} - \frac {\tan {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \tan ^{8}{\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)**8,x)

[Out]

Piecewise((x + tan(c + d*x)**7/(7*d) - tan(c + d*x)**5/(5*d) + tan(c + d*x)**3/(3*d) - tan(c + d*x)/d, Ne(d, 0
)), (x*tan(c)**8, True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 1441 vs. \(2 (52) = 104\).
time = 5.13, size = 1441, normalized size = 24.84 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^8,x, algorithm="giac")

[Out]

1/420*(105*pi + 420*d*x*tan(d*x)^7*tan(c)^7 - 105*pi*sgn(2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 - 2*tan(d*x
) - 2*tan(c))*tan(d*x)^7*tan(c)^7 - 105*pi*tan(d*x)^7*tan(c)^7 + 210*arctan((tan(d*x)*tan(c) - 1)/(tan(d*x) +
tan(c)))*tan(d*x)^7*tan(c)^7 + 210*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^7*tan(c)^7 - 294
0*d*x*tan(d*x)^6*tan(c)^6 + 735*pi*sgn(2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 - 2*tan(d*x) - 2*tan(c))*tan(
d*x)^6*tan(c)^6 + 735*pi*tan(d*x)^6*tan(c)^6 - 1470*arctan((tan(d*x)*tan(c) - 1)/(tan(d*x) + tan(c)))*tan(d*x)
^6*tan(c)^6 - 1470*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^6*tan(c)^6 + 420*tan(d*x)^7*tan(
c)^6 + 420*tan(d*x)^6*tan(c)^7 + 8820*d*x*tan(d*x)^5*tan(c)^5 - 2205*pi*sgn(2*tan(d*x)^2*tan(c) + 2*tan(d*x)*t
an(c)^2 - 2*tan(d*x) - 2*tan(c))*tan(d*x)^5*tan(c)^5 - 140*tan(d*x)^7*tan(c)^4 - 2205*pi*tan(d*x)^5*tan(c)^5 +
 4410*arctan((tan(d*x)*tan(c) - 1)/(tan(d*x) + tan(c)))*tan(d*x)^5*tan(c)^5 + 4410*arctan((tan(d*x) + tan(c))/
(tan(d*x)*tan(c) - 1))*tan(d*x)^5*tan(c)^5 - 2940*tan(d*x)^6*tan(c)^5 - 2940*tan(d*x)^5*tan(c)^6 - 140*tan(d*x
)^4*tan(c)^7 - 14700*d*x*tan(d*x)^4*tan(c)^4 + 3675*pi*sgn(2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 - 2*tan(d
*x) - 2*tan(c))*tan(d*x)^4*tan(c)^4 + 84*tan(d*x)^7*tan(c)^2 + 980*tan(d*x)^6*tan(c)^3 + 3675*pi*tan(d*x)^4*ta
n(c)^4 - 7350*arctan((tan(d*x)*tan(c) - 1)/(tan(d*x) + tan(c)))*tan(d*x)^4*tan(c)^4 - 7350*arctan((tan(d*x) +
tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^4*tan(c)^4 + 8820*tan(d*x)^5*tan(c)^4 + 8820*tan(d*x)^4*tan(c)^5 + 980
*tan(d*x)^3*tan(c)^6 + 84*tan(d*x)^2*tan(c)^7 + 14700*d*x*tan(d*x)^3*tan(c)^3 - 3675*pi*sgn(2*tan(d*x)^2*tan(c
) + 2*tan(d*x)*tan(c)^2 - 2*tan(d*x) - 2*tan(c))*tan(d*x)^3*tan(c)^3 - 60*tan(d*x)^7 - 588*tan(d*x)^6*tan(c) -
 2940*tan(d*x)^5*tan(c)^2 - 3675*pi*tan(d*x)^3*tan(c)^3 + 7350*arctan((tan(d*x)*tan(c) - 1)/(tan(d*x) + tan(c)
))*tan(d*x)^3*tan(c)^3 + 7350*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^3*tan(c)^3 - 14700*ta
n(d*x)^4*tan(c)^3 - 14700*tan(d*x)^3*tan(c)^4 - 2940*tan(d*x)^2*tan(c)^5 - 588*tan(d*x)*tan(c)^6 - 60*tan(c)^7
 - 8820*d*x*tan(d*x)^2*tan(c)^2 + 2205*pi*sgn(2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 - 2*tan(d*x) - 2*tan(c
))*tan(d*x)^2*tan(c)^2 + 84*tan(d*x)^5 + 980*tan(d*x)^4*tan(c) + 2205*pi*tan(d*x)^2*tan(c)^2 - 4410*arctan((ta
n(d*x)*tan(c) - 1)/(tan(d*x) + tan(c)))*tan(d*x)^2*tan(c)^2 - 4410*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c)
 - 1))*tan(d*x)^2*tan(c)^2 + 8820*tan(d*x)^3*tan(c)^2 + 8820*tan(d*x)^2*tan(c)^3 + 980*tan(d*x)*tan(c)^4 + 84*
tan(c)^5 + 2940*d*x*tan(d*x)*tan(c) - 735*pi*sgn(2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 - 2*tan(d*x) - 2*ta
n(c))*tan(d*x)*tan(c) - 140*tan(d*x)^3 - 735*pi*tan(d*x)*tan(c) + 1470*arctan((tan(d*x)*tan(c) - 1)/(tan(d*x)
+ tan(c)))*tan(d*x)*tan(c) + 1470*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)*tan(c) - 2940*tan
(d*x)^2*tan(c) - 2940*tan(d*x)*tan(c)^2 - 140*tan(c)^3 - 420*d*x + 105*pi*sgn(2*tan(d*x)^2*tan(c) + 2*tan(d*x)
*tan(c)^2 - 2*tan(d*x) - 2*tan(c)) - 210*arctan((tan(d*x)*tan(c) - 1)/(tan(d*x) + tan(c))) - 210*arctan((tan(d
*x) + tan(c))/(tan(d*x)*tan(c) - 1)) + 420*tan(d*x) + 420*tan(c))/(d*tan(d*x)^7*tan(c)^7 - 7*d*tan(d*x)^6*tan(
c)^6 + 21*d*tan(d*x)^5*tan(c)^5 - 35*d*tan(d*x)^4*tan(c)^4 + 35*d*tan(d*x)^3*tan(c)^3 - 21*d*tan(d*x)^2*tan(c)
^2 + 7*d*tan(d*x)*tan(c) - d)

________________________________________________________________________________________

Mupad [B]
time = 2.52, size = 44, normalized size = 0.76 \begin {gather*} x-\frac {-\frac {{\mathrm {tan}\left (c+d\,x\right )}^7}{7}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^5}{5}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^3}{3}+\mathrm {tan}\left (c+d\,x\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(c + d*x)^8,x)

[Out]

x - (tan(c + d*x) - tan(c + d*x)^3/3 + tan(c + d*x)^5/5 - tan(c + d*x)^7/7)/d

________________________________________________________________________________________